import turtle
import random

def xq():
    turtle.up()
    turtle.goto(point)
    turtle.down()
    for b in range(5):
        turtle.fillcolor('red')
        turtle.begin_fill()
        turtle.forward(20)
        turtle.left(144)
        turtle.end_fill()
    point[1]-=10


def bd():
    global gen_index
    for i in range(len(points)):
        turtle.up()
        turtle.goto(points[i])
        turtle.down()
        turtle.dot(20,'blue')
        points[i][0]-=10
    gen_index+=1
    if gen_index> 6:
        gen_index = 0
        gen_points(5)

def gen_points(num):
    for i in range(num):
        points.append([300, random.randint(-300, 300)])

def main():
    turtle.clear()
    xq()
    bd()
    turtle.ontimer(main, 200)


def click(x, y):
    point[1]+=20

a = 100
point = [0, 500]
points = []
gen_points(5)
gen_index = 0
turtle.tracer(False)
main()
turtle.onscreenclick(click, 1)

turtle.done()